package com.zbkj.crmeb.task.order;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import com.utils.DateUtil;
import com.zbkj.crmeb.user.service.UserBillService;

/**
 * 解冻未获的佣金订单
 */
@Component
@Configuration //读取配置
public class BillUnfreezeBySystem {
    private static final Logger logger = LoggerFactory.getLogger(BillUnfreezeBySystem.class);

    @Autowired
    private UserBillService userBillService;

    //1分钟同步一次数据
    //@XxlJob("billUnfreezeBySystem")
    public void init(){
        logger.info("---BillUnfreezeBySystem task------produce Data with fixed rate task: Execution Time - {}", DateUtil.nowDateTime());
        try {
            userBillService.billUnfreezeBySystem();
        }catch (Exception e){
            logger.error("BillUnfreezeBySystem.task" + " | msg : " + e.getMessage());
        }

    }

}
